package com.tedu;


import java.io.*;

public class Test1 {
    public static void main(String[] args) {

	try {
	FileOutputStream fos = new FileOutputStream("E:\\JVMDEV\\first\\src\\com\\tedu\\pw.txt",true);//append:true
	OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");
		BufferedWriter bw = new BufferedWriter(osw);
	PrintWriter pw = new PrintWriter(bw,true);//true自动刷新
	pw.write("你好!我喜欢java!");
	pw.close();
	System.out.println("写出完毕!");
	}catch(Exception e) {
		System.out.println("出错了!");
	}
    }
}